package com.njcky.model;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description 机构树模型
 * @CreateDate 2020/5/13 21:28
 * @Author lcy
 * @Version 1.0.0
 */
public class TreeNode {

    protected int id;
    protected int parentId;
    protected String name;
    protected List<TreeNode> children = new ArrayList<TreeNode>();

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<TreeNode> getChildren() {
        return children;
    }

    public void setChildren(List<TreeNode> children) {
        this.children = children;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void add(TreeNode node) {
        children.add(node);
    }
}
